package com.xlu.Controller;


import com.xlu.result.Result;
import com.xlu.serve.MajorServe;
import com.xlu.serve.StudentServe;
import com.xlu.vo.MajorVO;
import io.swagger.annotations.Api;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/admin/major")
@RestController
@Slf4j
@Api("专业相关")
public class MajorController {

    @Autowired
    private MajorServe majorServe;
    @GetMapping("/ListByCollege")
    public Result getListByCollege(Integer collegeId){
        log.info("{}",collegeId);
        List<MajorVO> majorVOList = majorServe.getListByCollege(collegeId);
        log.info("根据学院ID查询 专业{} 数据{}",collegeId,majorVOList);

        return Result.success(majorVOList);

//        return Result.success();
    }
}
